using Unity.Entities;

namespace Gj
{
    public struct EntityType
    {
        public bool self;
        public bool partner;
        public bool enemy;
        public bool terrain;
        public bool shield;
    }

    public struct EntityData : IComponentData
    {
        public uint id;
        public int index;
        public int category;
        public int identity;
        public Entity master;
        public float radius;

        public bool IsPartner(EntityData target)
        {
            return identity == target.identity;
        }

        public bool IsEnemy(EntityData target)
        {
            return identity != target.identity;
        }
    }

    public struct CastEntityData : IComponentData
    {
    }

    public struct LifeEntityData : IComponentData
    {
        public bool isLive;
    }

    public struct TerrainData : IComponentData
    {
    }

    public struct ShieldData : IComponentData
    {
        public Entity master;
    }
}